/*
 *      css_parser.h
 *      
 *      Copyright 2009 Aaron Lehrian <jsmaster@tampabay.rr.com>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */


#ifndef CSS_PARSER_H
#define CSS_PARSER_H


#include "css_property.h"
#include "css_document.h"

class css_parser
{
	public:
		css_parser();
		void openblock();
		void closeblock();
		int addattribute();
		virtual ~css_parser();
		void stripcomments();
		void parse(css_document *d,char *f);
		
	
	private:
		css_document *doc;
		css_property *temp;
		css_attribute *current;
		int currentnum;
		int currenttype;
		char *idname;
		char *classname;
		bool first;
		int idlength;
		int classlength;
		int taglength;
		char *tagname;
		char *id;
		char *idnamep;
		char *classnamep;
		char *tagnamep;
		char *idp;
		char *valuep;
		char *value;
		int vlength;
		int pos;
		char *file;
		int ret;
		int ctype;
		int commentlength;
		char *tmp;
		char *tmp2;
};

#endif /* CSS_PARSER_H */ 
